<extend name="Base/no_side_common" />
<block name="body">
<section id="contents">
  <div class="tab-content" style="margin-top:50px"> 
    <!-- 表单 -->
    <form class="form-horizontal bind_step_miniapp_form" method="post" action="{:U('Home/Apps/payment_set')}" id="form" style="overflow:hidden; zoom:1">
      <!-- 基础文档模型 -->
      <div class="tab-pane in tab1" id="tab1">
        <div class="item_wrap">
          <div class="form-item cf toggle-public_name">
            <label class="item-label"> <span class="need_flag">*</span> 微信支付商户号 </label>
            <div class="controls">
              <input type="text" value="{$info.mch_id}" name="mch_id" class="text input-large">
            </div>
          </div>
          <div class="form-item cf toggle-public_id">
            <label class="item-label"> <span class="need_flag">*</span> APPID </label>
            <div class="controls">
              <input type="text" value="{$info.appid}" name="appid" class="text input-large" readonly='true'>
            </div>
          </div>
          <div class="form-item cf toggle-appid">
            <label class="item-label"> <span class="need_flag">*</span> API密钥 </label>
            <div class="controls">
              <input type="text" value="{$info.partner_key}" name="partner_key" class="text input-large">
            </div>
          </div>
          <div class="form-item cf toggle-secret">
            <label class="item-label"> cert_pem证书 <span class="check-tips"> （apiclient_cert.pem 现金红包和企业付款必须） </span></label>
            
            <!-- <div class='controls upload_file' rel='cert_pem'>
              <input type='file' id='upload_file_cert_pem'>
              <input type='hidden' name='cert_pem' value='{$info.cert_pem}'/>
              <div class='upload-img-box'>
                <php> if (! empty ( $info['cert_pem'] )) { </php>
                <div class='upload-pre-file'><span class='upload_icon_all'></span>{:get_table_field ( $info['cert_pem'], 'id', 'name', 'File' )}</div>
                <php> } </php>
              </div>
            </div> -->
            
            <div class="controls upload_file">
                <div  id="upload_file_cert_pem" class="uploadrow_file"></div>
                <input type="hidden" name="cert_pem" id="cert_pem" value="{$info.cert_pem}" data-fileexts='' data-maxsize=''/>
                <div class="upload-img-box">
                  <present name="info['cert_pem']">
                    <div class="upload-pre-file"><span class="upload_icon_all"></span>{:get_table_field ( $info['cert_pem'], 'id', 'name', 'File' )}</div>
                  </present>
                </div>
              </div>
              
          </div>
          <div class="form-item cf toggle-secret">
            <label class="item-label"> key_pem证书 <span class="check-tips"> （apiclient_key.pem 现金红包和企业付款必须） </span></label>
          <!--   <div class='controls upload_file' rel='key_pem'>
              <input type='file' id='upload_file_key_pem'>
              <input type='hidden' name='key_pem' value='{$info.key_pem}'/>
              <div class='upload-img-box'>
                <php> if (! empty ( $info['key_pem'] )) { </php>
                <div class='upload-pre-file'><span class='upload_icon_all'></span>{:get_table_field ( $info['key_pem'], 'id', 'name', 'File' )}</div>
                <php> } </php>
              </div>
            </div> -->
             <div class="controls upload_file">
                <div  id="upload_file_key_pem" class="uploadrow_file"></div>
                <input type="hidden" name="key_pem" id="key_pem" value="{$info.key_pem}" data-fileexts='' data-maxsize=''/>
                <div class="upload-img-box">
                  <present name="info['key_pem']">
                    <div class="upload-pre-file"><span class="upload_icon_all"></span>{:get_table_field ( $info['key_pem'], 'id', 'name', 'File' )}</div>
                  </present>
                </div>
              </div>
              
          </div>
        </div>
        <div class="form-item cf mt_10 bind_step_miniapp_form_next_item">
          <input type="hidden" name="id" value="{$id|intval}">
          <button target-form="form-horizontal" type="submit" id="submit" class="btn submit-btn ajax-post">保 存</button>
          <br/>
          <!--<p style="padding:20px 0;">配置信息遇到问题？<a href="{:U('Home/index/lead')}" target="_blank">点击查看接入指引</a></p>--> 
        </div>
      </div>
    </form>
  </div>
</section>
</block>
<block name="script"> 
  <script type="text/javascript">
  initUploadFile();
$('#submit').click(function(){
    $('#form').submit();
});
</script> 
</block>
